package com.jiangwz.aop;

import java.util.Arrays;
import java.util.stream.Collectors;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author jiangwz
 * @create 2019/8/27.
 */
@Deprecated
public class MainTest {


    public static void main(String[] args){

        AnnotationConfigApplicationContext applicationContext = new AnnotationConfigApplicationContext();
        applicationContext.register(MainConfig2.class);
        applicationContext.refresh();
        Arrays.stream(applicationContext.getBeanDefinitionNames()).collect(Collectors.toList()).forEach(System.out::println);

        A bean = applicationContext.getBean(A.class);
        System.out.println(bean);


    }
}
